package com.app.controller;


import com.app.entity.Feedback;
import com.app.service.FeedbackService;
import com.app.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author zxy
 * @since 2021-04-07
 */
@RestController
@RequestMapping("/feedback")
public class FeedbackController {

    @Autowired
    private FeedbackService feedbackService;

    @RequestMapping("/addFeedback")
    public Result addFeedback(@RequestBody Feedback feedback) {
        return feedbackService.addFeedback(feedback);
    }
    @RequestMapping("/findFeedbackAdmin")
    public Result findFeedbackAdmin() {
        return feedbackService.findFeedbackAdmin();
    }

    @RequestMapping("/updateFeedbackAdmin/{id}")
    public Result updateFeedbackAdmin(@PathVariable Integer id) {
        return feedbackService.updateFeedbackAdmin(id);
    }
}

